package com.rd.student.wulian.wanggaobo.day0808;


import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class Exam02 {
    public static void main(String[] args){
        try {
            FileReader fileReader = new FileReader("D:\\JavaCode\\Code\\corejava\\src\\com\\zrrd\\day0808\\player");
            Scanner scanner = new Scanner(fileReader);
            System.out.println("输入球员名字：");
            Scanner sc = new Scanner(System.in);
            String name = scanner.nextLine();
            String scname = sc.nextLine();

            String [] playerData = name.split("，");
            String player = playerData[0];
            String team = playerData[1];
            if(scname.equals(player)){
                System.out.println(team);
            }
            if(!scname.equals(player)){
                System.out.println("无法找到该球员！");
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
